package com.jinghua.treatment.controller;

import com.jinghua.treatment.entity.SysClinictime;
import com.jinghua.treatment.service.SysClinictimeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 王兴光 on 2018/4/21.
 */
@Controller
public class SysClinictimeController {
    @Resource
    private SysClinictimeService clinictimeService;

    @ApiOperation(value = "根据门诊编号获取门诊时间列表")
    @GetMapping(value = "/getClinictimeList",params = {"clinicId"})
    @ResponseBody
    public List<SysClinictime> findByClinicId(Integer clinicId){return clinictimeService.selectByClinicId(clinicId);}

    @ApiOperation(value = "更新门诊时间")
    @GetMapping(value = "/updateClinictime")
    @ResponseBody
    public int findByClinicId(SysClinictime clinictime){return clinictimeService.updateByPrimaryKey(clinictime);}
}
